#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(fastfuzzycluster, 0.0, morria@cs.rpi.edu)
AC_CONFIG_SRCDIR([src/fuzzycluster.c])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE

AM_MAINTAINER_MODE
AM_SANITY_CHECK

# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB

GRAPHPACK=`pwd`/graphpack-1.0/src
AC_SUBST(GRAPHPACK)

AC_ARG_WITH(www-lib,
        AC_HELP_STRING([--with-www-lib=<path>],[prefix of w3c-libwww headers]),
        [WWW_LIB=$with_www-lib],
        [WWW_LIB="/usr/local/include/w3c-libwww"])
AC_SUBST(WWW_LIB)

# Checks for libraries.
AC_CHECK_LIB([graphpack], [compute_connected_components])

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memset pow sqrt strcasecmp])

AC_CONFIG_FILES([Makefile
                 graphpack-1.0/Makefile
                 graphpack-1.0/src/Makefile
                 src/Makefile])
AC_OUTPUT
